home *** CD-ROM | disk | FTP | other *** search
/ Hidden Truth / Hidden Truth.iso / amiga / install < prev    next >
Text File  |  1996-09-07  |  20KB  |  515 lines

  1. ; $VER: Install_AWeb 1.0 (14.03.96)
  2. ; Description: Installer script for AWeb
  3.  
  4. (set cpu (database "cpu"))
  5. (set cpu020 (and (<> cpu "68000") (<> cpu "68010")))
  6. (set v39 (>= (/ (getversion "exec.library" (resident)) 65536) 39))
  7.  
  8. (set awn (getversion "AWeb"))
  9. (set awv (/ awn 65536))
  10. (set awr (- awn (* awv 65536)))
  11.  
  12. ; all strings used in this installer script
  13. (set #need39 "This program requires OS 3.0 or later to function.")
  14. (set #nohelp "No help available.")
  15. (set #welcome
  16.    (cat "AWeb is a fast, multithreaded World Wide Web browser for Amiga OS 3.0.\nIt understands virtually all widely used HTML and has many other features.\nAWeb doesn't use MUI.\nIt runs with a wide variety of TCP-stacks.\nIt has an ARexx and Shell command interface."
  17.       ("\n\nThis installation procedure will install the AWeb browser version %ld.%ld on your system.\n" awv awr)
  18.       "It will not overwrite your existing preferences"
  19.    )
  20. )
  21. (set #classactnote "AWeb needs a recent set of ClassAct classes.\nYou can find the latest classes via FTP on:\nftp.warped.com/classact/\n\nIf AWeb complains that it cannot find xxxx.image or xxxx.gadget, you need to upgrade your ClassAct installation.")
  22. (set #destdir-prompt "Please select the directory where you want AWeb installed.\n(If you do not accept the default, a directory 'AWeb' will be created there.)")
  23. (set #destdir-help "A directory for AWeb will be created here. By accepting the default directory, most of the files don't have to be copied.")
  24. (set #installing "Installing ")
  25. (set #languages-prompt "Please select which language catalog(s) you want to install")
  26. (set #languages-help @askoptions-help)
  27. (set #icons-prompt "Please select what icon you want to install")
  28. (set #icons-help "The archive is shipped with three different icons for the AWeb program.\nIcons for the standard Workbench, for Magic WB and for NewIcon are included.\n\nPlease select which of these icons you want to be installed.")
  29. (set #icons-message "You may have to edit the AWeb icon by hand afterwards. The little square in the unselected image should be red. Because you may have another Workbench palette installed than the default, the square may be in the wrong colour. You can use an icon editor to correct it.")
  30. (set #memory-prompt "Is your Amiga equipped with more than 2MB of memory?")
  31. (set #memory-help "AWeb runs perfectly on a 2MB Amiga, but needs a special setup on such a machine. If you click the 'only 2MB' button, the appropriate settings will be installed.\n\nYou can always change the settings after installation.")
  32. (set #fonts-prompt "Do you want to use small or large fonts for your browser window?\nSmall fonts are based on times.font/13,\nlarge fonts are based on times.font/15 with larger headings than the small font.")
  33. (set #fonts-help 
  34.    (cat "If you choose 'large fonts', settings will be installed that make AWeb look as closely to the standard NetScape setup as possible, using standard Workbench fonts.\n\n"
  35.       "Please note that the 'large fonts' settings need the CGTimes scalable font properly installed.\n\n"
  36.       "If you plan to run AWeb on a small screen (less than 640 x 400), you might want to select 'small fonts' to make the pages readable.\n\nYou can always change the settings after installation.")
  37.    )
  38.  
  39. (set #readme "Displaying the version notes readme...")
  40. (set #bye "In case you need help configuring or using AWeb, pressing the HELP key when AWeb is active will bring up the documentation.\nI hope you will enjoy using AWeb.")
  41.  
  42. (set #languageGreek-message
  43.    (cat
  44.       "The Greek translation can only be used if you own the (commercial)"
  45.       "Greek Workbench Package, (c) by AC Software.\n\n"
  46.    )
  47. )
  48. (set #language-message
  49.    "Note that not all localized catalogs are translated yet.\nIf you use the catalog, you might encounter a strange mix of your language and English"
  50. )
  51. (set #prefs-message
  52.    (cat
  53.       "This version of AWeb uses an improved way of storing its settings.\n\n"
  54.       "The normal settings (AWeb.prefs) have been converted by this installation procedure.\n\n"
  55.       "If you use other settings files (CONFIG tooltype or argument) you will have to convert them yourself.\n"
  56.       "This release contains a program 'AWebPC' just for this purpose.\n\n"
  57.       "Do you want to read the readme for this program now?"
  58.    )
  59. )
  60. (set #no-prefs-message
  61.    (cat
  62.       "This version of AWeb uses an improved way of storing its settings.\n\n"
  63.       "The existing settings (AWeb.prefs) could not be found during the installation.\n\n"
  64.       "If you have configured AWeb before, you should convert your old settings yourself.\n"
  65.       "If you use other settings files (CONFIG tooltype or argument) you will also have to convert them yourself.\n"
  66.       "This release contains a program 'AWebPC' just for this purpose.\n\n"
  67.       "Do you want to read the readme for this program now?"
  68.    )
  69. )
  70. (set #env-prefs-message
  71.    (cat
  72.       "This version of AWeb uses an improved way of storing its settings.\n\n"
  73.       "New settings already exist, this installation did not overwrite them.\n\n"
  74.       "If your old settings haven't been converted yet, you should do so yourself.\n"
  75.       "If you use other settings files (CONFIG tooltype or argument) you will also have to convert them yourself.\n"
  76.       "This release contains a program 'AWebPC' just for this purpose.\n\n"
  77.       "Do you want to read the readme for this program now?"
  78.    )
  79. )
  80.  
  81. (set #converting-prefs "Converting your default settings")
  82.  
  83. (set #contrib "In the 'Contrib' directory of the installation archive, you can find several utilities that could prove useful with Voodoo.\n\nNext you will have a chance to install some of these utilities.\n\nBefore deleting this directory after installation, please take a closer look at what else is available in the 'Contrib' dir.")
  84. (set #contrib-obtaingir "Would you like to install NewObtainGIRPort?\n\nThis small program patches the ObtainGIRPort() function of intuition.library to avoid deadlock situations in complex BOOPSI gadgets.")
  85. (set #obtaingir-startup "Adding NewObtainGIRPort to system startup files")
  86.  
  87. ; ---------------------------------------------------------------------------
  88.  
  89. ; ************* PLEASE COPY THIS PROCEDURE ALONG WITH THE STRINGS IT USES 
  90. ; ************* TO THE INSTALLER SCRIPT OF YOUR CLASSACT APPLICATION.
  91. ; ************* IT WILL TAKE CARE OF INSTALLING THE CLASSACT CLASSES YOU
  92. ; ************* PROVIDED WITH YOUR APPLICATION TO THE USER'S SYSTEM.
  93.  
  94. ; ClassAct installation procedure V 1.5 (12.5.96) by Osma Ahvenlampi
  95.  
  96. ; percentage of the size of included ClassAct classes versus the whole
  97. ; distribution (ie. total "complete" percentage after ClassAct is installed)
  98. (set classact-complete 50)
  99.  
  100. ; ClassAct installer scripts
  101. (set #classdest-prompt "Please select the directory where you want the ClassAct classes installed.\n(See help for details)")
  102. (set #classdest-help (cat "ClassAct is a GUI toolkit consisting of shared BOOPSI classes.\n\nSome programs require some or all of the ClassAct classes installed on your system. "
  103.     (if v39 (cat "OS 3.0 has a standard directory for BOOPSI classes, the SYS:Classes directory. It is recommended that you install ClassAct there.")
  104.             (cat "OS 2.0 does not have a standard place for disk resident BOOPSI classes. On OS 3.0 these classes are stored in the SYS:Classes directory. It is recommended that you create this directory and install ClassAct there.\nThis directory must be added in the LIBS: assign. This can be done by placing the command\nAssign >NIL: LIBS: SYS:Classes ADD\nto User-Startup. This installer will do this for you.")
  105.         )
  106.     )
  107. )
  108. (set #classes-020 "Do you want to use the OS 3.0, 020 optimised version of ClassAct?")
  109. (set #help-020 "Some ClassAct libraries have versions optimised for use on 020 or better equipped OS 3.0 or later machines. If your Amiga is such equipped, you should install these. The 68000/2.0 versions will also work, but are slightly slower.")
  110. (set #noclasses-message "The directory you selected for your ClassAct classes is not a part of the LIBS: assign.\n\nIt is necessary to add this assign so that the classes will be found properly.")
  111. (set #creating-dir "Creating directory ")
  112. (set #usbackup-prompt "User-Startup will now be backed up.")
  113. (set #usbackup-help "This installer will next make a modification in User-Startup. Before doing this the old User-Startup will be backed up to S:User-Startup.old")
  114. (set #adding-1 "Adding ")
  115. (set #adding-2 " to LIBS: assign\n")
  116. (set #adding-help "This is necessary so that the custom classes can be found.")
  117. (set #junod-button "It seems you have a late Commodore 'V42' button.gadget installed on your system.\n\nClassAct's button.gadget is far more capable than this gadget, and we recommend that you replace it. The ClassAct button.gadget is backwards compatible to the Commodore gadget. Do you wish to back up the Commodore gadget and replace it with the ClassAct version?")
  118. (set #junod-backed "The Commodore 'V42' button.gadget has been backed up with the name button.gadget.v42.\n\nThe ClassAct button.gadget will be installed in its place.")
  119. (set #junod-kept "The Commodore 'V42' button.gadget was not replaced with the more capable ClassAct version.\n\nPrograms depending on the availability of ClassAct-only features will be likely to work wrong.")
  120. (set #caprefs-message "CAPrefs is a small utility that sets some user preferences for ClassAct applications. These include the bevel style (Thin/Gadtools/Xen), window backfills, and group label details.\n\nPlease use the ClassAct GUI prefs editor to alter the default settings provided. ClassAct prefs will be installed in your system Prefs drawer.\n\n")
  121. (set #caprefs-startup-1 "Adding the command\n\n")
  122. (set #caprefs-startup-2 "\n\nTo your s:User-Startup.")
  123.  
  124. (procedure install-classact
  125. ; call this procedure to copy the classes included in the Classes directory
  126. ; in your distribution dir.
  127.     (if (exists "Classes") ; The archive contains a ClassAct library update.
  128.     (
  129.         (set comp-dest  (/ (* classact-complete 2) 10))
  130.         (set comp-libs  (/ (* classact-complete 3) 10))
  131.         (set comp-dirs  (/ (* classact-complete 4) 10))
  132.         (set comp-junod (/ (* classact-complete 5) 10))
  133.         (set comp-020   (/ (* classact-complete 6) 10))
  134.         (set comp-gad   (/ (* classact-complete 7) 10))
  135.         (set comp-im    (/ (* classact-complete 8) 10))
  136.         (set comp-prefs (/ (* classact-complete 9) 10))
  137.     
  138.         ; has the user installed ClassAct in CLASSACT: ?
  139.         (set @classact-dest (getassign "CLASSACT" "A"))
  140.         (if (= @classact-dest "") (set @classact-dest "SYS:Classes"))
  141.         
  142.         ; is ClassAct already in SYS:Classes ?
  143.         (if (or (not (exists (tackon @classact-dest "Gadgets/layout.gadget") (noreq)))
  144.                 (= @user-level 2))
  145.             ; no, ask where it should be placed
  146.             (set @classact-dest
  147.                 (askdir
  148.                     (prompt #classdest-prompt)
  149.                     (help #classdest-help)
  150.                     (default @classact-dest)
  151.                     (newpath)
  152.                 )
  153.             )
  154.         )
  155.         
  156.         (complete comp-dest)
  157.         
  158.         (if (<> (run (cat "C/CheckAssign LIBS: " @classact-dest)) 0)
  159.             (
  160.                 (message #noclasses-message)
  161.                 (if (not (exists @classact-dest))
  162.                     (makedir @classact-dest (prompt (cat #creating-dir @classact-dest)))
  163.                 )
  164.                 (set @addassign (cat "Assign >NIL: LIBS: " @classact-dest " ADD\n"))
  165.                 (startup "CLASSACT"
  166.                     (command @addassign)
  167.                     (prompt (cat #adding-1 @classact-dest #adding-2))
  168.                     (help #adding-help)
  169.                 )
  170.                 (run (@addassign))
  171.             )
  172.         )
  173.         
  174.         (complete comp-libs)
  175.         
  176.         (set @classact-gadgets (tackon @classact-dest "Gadgets"))
  177.         (set @classact-images (tackon @classact-dest "Images"))
  178.         
  179.         (if (not (exists @classact-gadgets (noreq)))
  180.             (makedir @classact-images
  181.                 (prompt (cat #creating-dir @classact-gadgets))
  182.             )
  183.         )
  184.         
  185.         (if (not (exists @classact-images (noreq)))
  186.             (makedir @classact-images
  187.                 (prompt (cat #creating-dir @classact-images))
  188.             )
  189.         )
  190.         
  191.         (complete comp-dirs)
  192.         
  193.         (if (exists "SYS:Classes/Gadgets/button.gadget")
  194.             (if (< 40 (/ (getversion "SYS:Classes/Gadgets/button.gadget") 65536))
  195.                 (if (askbool (prompt #junod-button) (help @askbool-help) (default 1))
  196.                     (
  197.                         (rename "SYS:Classes/Gadgets/button.gadget" "SYS:Classes/Gadgets/button.gadget.v42")
  198.                         (message #junod-backed)
  199.                     )
  200.                     (message #junod-kept)
  201.                 )
  202.             )
  203.         )
  204.         
  205.         (complete comp-junod)
  206.         
  207.         (if (exists "Classes/Gadgets/layout.gadget.020")
  208.             (set classes-020 (askbool (prompt #classes-020) (help #help-020) (default (and cpu020 v39))))
  209.             (set classes-020 0)
  210.         )
  211.  
  212.         (complete comp-020)
  213.         
  214.         (foreach "Classes/Gadgets" "#?.gadget"
  215.             (
  216.                 (set thislib (tackon "Classes/Gadgets" @each-name))
  217.                 (if (and classes-020 (exists (cat thislib ".020")))
  218.                     (set thislib (cat thislib ".020"))
  219.                 )
  220.                 (copylib (source thislib)
  221.                     (dest @classact-gadgets)
  222.                     (newname @each-name)
  223.                     (prompt (cat #installing @each-name))
  224.                     (help #classdest-help)
  225.                     (optional "force" "askuser")
  226.                 )
  227.             )
  228.         )
  229.         
  230.         (complete comp-gad)
  231.         
  232.         (foreach "Classes/Images" "#?.image"
  233.             (
  234.                 (set thislib (tackon "Classes/Images" @each-name))
  235.                 (if (and classes-020 (exists (cat thislib ".020")))
  236.                     (set thislib (cat thislib ".020"))
  237.                 )
  238.                 (copylib (source thislib)
  239.                     (dest @classact-images)
  240.                     (newname @each-name)
  241.                     (prompt (cat #installing @each-name))
  242.                     (help #classdest-help)
  243.                     (optional "force" "askuser")
  244.                 )
  245.             )
  246.         )
  247.         
  248.         (complete comp-im)
  249.  
  250.         (foreach "Classes" "#?.class"
  251.             (
  252.                 (set thislib (tackon "Classes" @each-name))
  253.                 (if (and classes-020 (exists (cat thislib ".020")))
  254.                     (set thislib (cat thislib ".020"))
  255.                 )
  256.                 (copylib (source thislib)
  257.                     (dest @classact-dest)
  258.                     (newname @each-name)
  259.                     (prompt (cat #installing @each-name))
  260.                     (help #classdest-help)
  261.                     (optional "force" "askuser")
  262.                 )
  263.             )
  264.         )
  265.     )
  266.     )
  267.     (if (exists "Prefs/ClassAct") ; The archive contains ClassAct prefs tools
  268.     (
  269.         (message #caprefs-message)
  270.         
  271.         (copylib (source "Prefs/CAPrefs") 
  272.             (dest "C:") 
  273.             (prompt (cat #installing "CAPrefs"))
  274.         )
  275.         (copylib (source "Prefs/ClassAct")
  276.             (dest "SYS:Prefs")
  277.             (prompt (cat #installing "ClassAct Prefs"))
  278.             (infos)
  279.         )
  280.         
  281.         (complete comp-prefs)
  282.         
  283.         (if (not (exists "ENVARC:ClassAct" (noreq)))
  284.             (
  285.                 (makedir "ENVARC:ClassAct"
  286.                     (prompt (cat #creating-dir "ENVARC:ClassAct"))
  287.                 )
  288.                 (textfile (dest "ENVARC:ClassAct/ClassAct")
  289.                     (append "")
  290.                 )
  291.             )
  292.         )
  293.                 
  294.         (set caprefs-cmd "C:CAPrefs >NIL:\n")
  295.         
  296.         (startup "CAPREFS"
  297.             (prompt (cat #caprefs-startup-1 caprefs-cmd #caprefs-startup-2))
  298.             (help #caprefs-message)
  299.             (command caprefs-cmd)
  300.         )
  301.     )
  302.     )
  303.  
  304.     (complete classact-complete)
  305. )
  306.  
  307. ; ************** END OF CLASSACT INSTALL PROCEDURE. COPY THE BLOCK ABOVE
  308. ; ************** TO YOUR CLASSACT APPLICATION INSTALLER.
  309.  
  310. ; ---------------------------------------------------------------------------
  311.  
  312. (complete 0)
  313.  
  314. (if (not v39)
  315.    (abort #need39)
  316. )
  317.  
  318. (message #welcome)
  319.  
  320. (set @source-dir (pathonly @icon))
  321.  
  322. (set defdir
  323.    (askdir
  324.       (prompt #destdir-prompt)
  325.       (help #destdir-help)
  326.       (default @source-dir)
  327.    )
  328. )
  329. (set @default-dest defdir)
  330.  
  331. (set nocopy (= @source-dir @default-dest))
  332.  
  333. ; (install-classact)
  334. (message #classactnote)
  335.  
  336. (if (not nocopy)
  337.     (
  338.        (set @default-dest (tackon @default-dest "AWeb"))
  339.     
  340.        (set update-aweb (exists @default-dest))
  341.     
  342.        (if (not update-aweb)
  343.            (makedir @default-dest 
  344.                (prompt #creating-dir @default-dest) 
  345.                (infos)
  346.            )
  347.        )
  348.  
  349.       (copyfiles
  350.          (source "")
  351.          (dest @default-dest)
  352.          (choices "AWeb")
  353.          (prompt #installing "AWeb")
  354.       )
  355.       (complete 10)
  356.  
  357.       (copyfiles
  358.          (source "")
  359.          (dest @default-dest)
  360.          (choices "AWebCfg" "AWebPC" "Install_Buttons" "Install_Animation")
  361.          (prompt #installing "AWeb")
  362.          (infos)
  363.       )
  364.       (complete 20)
  365.  
  366.       (set cache-dir (tackon @default-dest "Cache"))
  367.       (if (not (exists cache-dir))
  368.          (
  369.             (makedir cache-dir
  370.                (prompt #creating-dir cache-dir)
  371.                (infos)
  372.             )
  373.          )
  374.       )
  375.       (complete 30)
  376.  
  377.       (if (exists (tackon @default-dest "Docs/Settings"))
  378.          (run
  379.             (cat "delete " (tackon @default-dest "Docs/Settings/#?") " all quiet")
  380.             (prompt #installing "AWeb")
  381.          )
  382.       )
  383.  
  384.        (copyfiles
  385.          (source "")
  386.           (dest @default-dest)
  387.          (choices "ReadMe" "AWebPC.ReadMe" "Docs" "Icons" "Extras" "Images" "Storage")
  388.           (prompt #installing "AWeb")
  389.           (infos)
  390.        )
  391.       (complete 40)
  392.  
  393.       (set languages
  394.          (askoptions
  395.             (choices "English" "Czech" "Dansk" "Deutsch" "Espa±ol" "Franτais" "Greek"
  396.                "Italiano" "Nederlands" "Norsk" "Polski" "Svenska")
  397.             (prompt #languages-prompt)
  398.             (help #languages-help)
  399.             (default 1)
  400.          )
  401.       )
  402.  
  403.       (complete 50)
  404.  
  405.       ; If any language calalogs are selected, copy them.
  406.  
  407.       (if (bitand languages 65534)
  408.          (
  409.             (set catdir (tackon @default-dest "Catalogs"))
  410.             (if (not (exists catdir))
  411.                (makedir catdir
  412.                   (prompt #creating-dir catdir) 
  413.                   (infos)
  414.                )
  415.             )
  416.             (set bit 2)    ; English implementation, so there is no catalog for it
  417.             (set langnr 1)
  418.             (while (< langnr 9)
  419.                (if (bitand languages bit)
  420.                   (
  421.                      (set lang
  422.                         ; English is never selected from this list
  423.                         (select langnr "English" "Czech" "Dansk" "Deutsch" "Espa±ol" 
  424.                            "Franτais" "Greek"
  425.                            "Italiano" "Nederlands" "Norsk" "Polski" "Svenska"
  426.                         )
  427.                      )
  428.                      (copyfiles
  429.                         (source (tackon "Catalogs" lang))
  430.                         (choices "AWeb.catalog" "AWebCfg.catalog")
  431.                         (dest (tackon catdir lang))
  432.                      )
  433.                     ; Display Copyright message for Greek
  434.                      (if (= 6 langnr) 
  435.                         (message #languageGreek-message)
  436.                      )
  437.                   )
  438.                )
  439.                (set bit (shiftleft bit 1))
  440.                (set langnr (+ langnr 1))
  441.             )
  442.             (message #language-message)
  443.          )
  444.       )
  445.  
  446.     )
  447. )
  448.  
  449. (complete 60)
  450.  
  451. (if (or nocopy (not (exists (tackon @default-dest "AWeb.info"))))
  452.    (
  453.       (set #icontype
  454.          (askchoice
  455.             (prompt #icons-prompt)
  456.             (choices
  457.                "Standard"
  458.                "Magic WB"
  459.                "NewIcon"
  460.             )
  461.             (help #icons-help)
  462.          )
  463.       )
  464.  
  465.       (copyfiles
  466.          (source
  467.             (select #icontype
  468.                "Icons/AWeb.info"
  469.                "Icons/AWeb_MagicWB.info"
  470.                "Icons/AWeb_NewIcon.info"
  471.             )
  472.          )
  473.          (dest @default-dest)
  474.          (newname "AWeb.info")
  475.          (infos)
  476.       )
  477.  
  478.       (if (= #icontype 0)
  479.          (message #icons-message)
  480.       )
  481.    )
  482. )
  483.  
  484. (complete 80)
  485.  
  486. (if (not (exists "ENVARC:AWeb"))
  487.    (if (exists (tackon @default-dest "AWeb.prefs"))
  488.       (  (run (cat "AWebPC " (tackon @default-dest "AWeb.prefs")) (prompt #converting-prefs))
  489.          (set prefs #prefs-message)
  490.       )
  491.       (  (set prefs #no-prefs-message)
  492.       )
  493.    )
  494.    (  (set prefs #env-prefs-message)
  495.    )
  496. )
  497. (if
  498.    (
  499.       (askbool
  500.          (prompt prefs)
  501.          (help "")
  502.          (choices "Yes" "No")
  503.          (default 1)
  504.       )
  505.    )
  506.    (  (run "SYS:Utilities/MultiView AWebPC.ReadMe" (prompt #readme))
  507.    )
  508. )
  509.  
  510. (complete 100)
  511.  
  512. (run "run >NIL: SYS:Utilities/MultiView README" (prompt #readme))
  513.  
  514. (exit #bye)
  515.